package iwpl.project.entities;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * EquipmentHistories entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "EquipmentHistories")
public class EquipmentHistories implements java.io.Serializable {

	// Fields

	private Integer id;
	private Employees employees;
	private EquipmentDetails equipmentDetails;
	private Timestamp maintainDate;
	private String descriptions;

	// Constructors

	/** default constructor */
	public EquipmentHistories() {
	}

	/** minimal constructor */
	public EquipmentHistories(Integer id) {
		this.id = id;
	}

	/** full constructor */
	public EquipmentHistories(Integer id, Employees employees,
			EquipmentDetails equipmentDetails, Timestamp maintainDate,
			String descriptions) {
		this.id = id;
		this.employees = employees;
		this.equipmentDetails = equipmentDetails;
		this.maintainDate = maintainDate;
		this.descriptions = descriptions;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EmployeeID")
	public Employees getEmployees() {
		return this.employees;
	}

	public void setEmployees(Employees employees) {
		this.employees = employees;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EDID")
	public EquipmentDetails getEquipmentDetails() {
		return this.equipmentDetails;
	}

	public void setEquipmentDetails(EquipmentDetails equipmentDetails) {
		this.equipmentDetails = equipmentDetails;
	}

	@Column(name = "MaintainDate", length = 16)
	public Timestamp getMaintainDate() {
		return this.maintainDate;
	}

	public void setMaintainDate(Timestamp maintainDate) {
		this.maintainDate = maintainDate;
	}

	@Column(name = "Descriptions")
	public String getDescriptions() {
		return this.descriptions;
	}

	public void setDescriptions(String descriptions) {
		this.descriptions = descriptions;
	}

}